package de.fhwf.mixedreality.client2008;

import de.fhwf.mixedreality.client.AbstractPositionsStorage;
import de.fhwf.mixedreality.client.IClient;
import de.fhwf.mixedreality.client.Vector;

public class PositionsStorage extends AbstractPositionsStorage {
 private IClient.Team mTeam;

 public PositionsStorage(Client2008 client, IClient.Team team) {
	super(client);
	mTeam = team;
 }
 
 void setLeftCornerFlag1(Vector leftCornerFlag1) {
	if (mTeam == IClient.Team.YELLOW) {
	 mMyCornerFlag1 = leftCornerFlag1;
	} else {
   mOpCornerFlag1 = leftCornerFlag1;
  }
 }

 void setLeftCornerFlag2(Vector leftCornerFlag2) {
	if (mTeam == IClient.Team.YELLOW) {
	 mMyCornerFlag2 = leftCornerFlag2;
	} else {
   mOpCornerFlag2 = leftCornerFlag2;
  }
 }

 void setLeftGoalPole1(Vector leftGoalPole1) {
	if (mTeam == IClient.Team.YELLOW) {
	 mMyGoalPole1 = leftGoalPole1;
	} else {
	 mOpGoalPole1 = leftGoalPole1;
  }
 }

 void setLeftGoalPole2(Vector leftGoalPole2) {
	if (mTeam == IClient.Team.YELLOW) {
	 mMyGoalPole2 = leftGoalPole2;
	} else {
	 mOpGoalPole2 = leftGoalPole2;
  }
 }

 void setRightCornerFlag1(Vector rightCornerFlag1) {
	if (mTeam == IClient.Team.YELLOW) {
	 mOpCornerFlag1 = rightCornerFlag1;
	} else {
   mMyCornerFlag1 = rightCornerFlag1;
  }
 }

 void setRightCornerFlag2(Vector rightCornerFlag2) {
  if (mTeam == IClient.Team.YELLOW) {
	 mOpCornerFlag2 = rightCornerFlag2;
	} else {
   mMyCornerFlag2 = rightCornerFlag2;
  }
 }

 void setRightGoalPole1(Vector rightGoalPole1) {
	if (mTeam == IClient.Team.YELLOW) {
	 mOpGoalPole1 = rightGoalPole1;
	} else {
	 mMyGoalPole1 = rightGoalPole1;
  }
 }

 void setRightGoalPole2(Vector rightGoalPole2) {
	if (mTeam == IClient.Team.YELLOW) {
	 mOpGoalPole2 = rightGoalPole2;
	} else {
	 mMyGoalPole2 = rightGoalPole2;
  }
 }

 @Override
 public String getWorldString(boolean isLost) {
	return XMLProtocol.sendWorldDataApplication(this, mTeam, isLost);
 }
}